<?php 
$Content = QContext::instance();
$base_url = $Content->requestUDI();
$search = $base_url;
$search['action'] = 'search';
$hangup = $base_url;
$hangup['action'] = 'hangup';

?>

<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			
			
		<li class="line">line</li>
			<li><a class="edit" href="<?php echo url('system/databak')?>" target="ajaxTodo" ><span>备份</span></a></li>
		
		</ul>
	</div>
	<table class="table" width="1200" layoutH="59">
		<thead>
			<tr>
				
				<th width="5%" >数据文件</th>
				<th width="5%" >大小</th>
				<th width="5%" >选项</th>
			
				
			</tr>
		</thead>
		<tbody>
			<?php 
				
$dir = $path;
if (is_dir($dir)) {
    if ($dh = opendir($dir)) {
        while (($file = readdir($dh)) !== false ) {
            $type = filetype($dir . $file);
            $filename = $dir.DS.$file;
            $size = filesize($filename);
            if ($type == 'file' )
            {
        	echo "<tr><td>{$file}</td> <td>{$size}</td> <td>";
        	//echo '<a class="edit" href="'.url('system/doback',array('filename'=>$file)).'" target="ajaxTodo" title="确定要恢复吗?">恢复</a>&nbsp;&nbsp;&nbsp;';
        	echo '<a class="edit" href="/uploadfiles/file/'.$file.'" ><span>下载</span></a>';
        	
        	echo "</td></tr>";
            }
        	//print "filename: $file : filetype: " . filetype($dir . $file) . "\n";
        }
        closedir($dh);
    }
}
			
				
			?>
			
			
			
		</tbody>
	</table>
	
</div>